<template>
  <el-container>
    <div class="smallmain">
      <div>
        <el-card class="box-cardone">
          <div class="block" v-for="fit in fits" :key="fit">
            <span class="title">{{ fit }}</span>
            <el-avatar
              shape="square"
              :size="100"
              :fit="fit"
              :src="url"
            ></el-avatar>
          </div>
        </el-card>
      </div>
      <div class="ranking">
        <el-card class="box-cardleft">
          <el-form ref="form" :model="form" label-width="80px">
            <el-form-item label="文章标题">
              <el-input v-model="form.name"></el-input>
            </el-form-item>
            <el-form-item label="文章简介">
              <el-input type="textarea" v-model="form.desc"></el-input>
            </el-form-item>
            <el-form-item label="文章内容">
              <el-input type="textarea" v-model="form.desc"></el-input>
            </el-form-item>
            <el-form-item>
              <el-button type="primary" @click="onSubmit" class="confirm"
                >发布</el-button
              >
              <el-button class="cancel">重置</el-button>
            </el-form-item>
          </el-form>
        </el-card>
      </div>
    </div>
  </el-container>
</template>

<script>
export default {
  data() {
    return {
      fits: [""],
      url: "https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg",
      form: {
        name: "",
        region: "",
        date1: "",
        date2: "",
        delivery: false,
        type: [],
        resource: "",
        desc: "",
      },
    };
  },
  methods: {
    onSubmit() {
      console.log("submit!");
    },
  },
};
</script>

<style scoped>
.smallmain {
  width: 800px;
}

.cancel {
  float: right;
}
</style>